import { patientMedicineOrderDetail } from '@/api/order'
import type { patientMedicineOrderDetailApi } from '@/types/order'
import { ref } from 'vue'
// vue文件中获取路由的值  用useRoute()   ts文件用  router

export const useInit = (id: string) => {
  console.log('id', id)

  const info = ref<patientMedicineOrderDetailApi>()
  const getData = async () => {
    const res = await patientMedicineOrderDetail(id)
    info.value = res.data
    console.log(res)
  }
  getData()
  return { info }
}
